package com.chen.lifepic.httpList;

import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.JsonHttpResponseHandler;

public class RequestPicturesURLHelper {
	public static final String url = "http://tupian.baidu.com/channel/listjson?fr=channel&tag1=%E7%BE%8E%E5%A5%B3&tag2=%E6%80%A7%E6%84%9F&sorttype=0&pn=30&rn=10&ie=utf8&oe=utf-8&1373890413423";

	AsyncHttpClient _client = null;

	JsonHttpResponseHandler _handler;

	public RequestPicturesURLHelper(JsonHttpResponseHandler handler) {
		_client = new AsyncHttpClient();
		_handler = handler;
	}

	public void request() {
		if (null == _client || null == _handler)
			return;

		// _client.post(url, _handler);
		_client.get(url, null, _handler);
	}

	public void destroy() {
		_client = null;
		_handler = null;
	}
}
